﻿@{
    Layout = null;
}
@using MvcMall.AdminPortal.Controllers.MailTemplate.ViewModels;
@model SaveMailTemplateModel
<!DOCTYPE html>
<html>
<head>
    <title>新增/修改邮件通知模板</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#tabs").tabs();
        });  
    </script>
</head>
<body>
    <div id="tabs">
        <ul>
            <li><a href="#save">
                @if (Model == null || Model.Id == null)
                {
                    @:新增邮件通知模板
                }
                else
                {
                    @:修改邮件通知模板
                }
            </a></li>
        </ul>
        <div id="save">
            @using (Html.BeginForm())
            {
                <fieldset>
                    @Html.HiddenFor(m => m.Id)
                    <div class="editor-label">
                        @Html.LabelFor(m => m.MailTemplateType)
                    </div>
                    <div class="editor-field">
                        @Html.DropDownListFor(m => m.MailTemplateType, ViewData["MailTemplateTypeList"] as IEnumerable<SelectListItem>)
                        @Html.ValidationMessageFor(m => m.MailTemplateType)
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(m => m.MailTemplateName)
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(m => m.MailTemplateName)
                        @Html.ValidationMessageFor(m => m.MailTemplateName)
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(m => m.Title)
                    </div>
                    <div class="editor-field">
                        @Html.TextBoxFor(m => m.Title)
                        @Html.ValidationMessageFor(m => m.Title)
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(m => m.MailBody)
                    </div>
                    <div class="editor-field">
                        @Html.TextAreaFor(m => m.MailBody, new { @style = "width:400px;height:300px" })
                        @Html.ValidationMessageFor(m => m.MailBody)
                    </div>
                    <p>
                        <input type="submit" value="保存模板" /></p>
                </fieldset>
            }
        </div>
    </div>
</body>
</html>
